import random
target = random.randint(0, 9)
count = 0
while True:
    guess = int(input("请输入你猜的数字（0-9）："))
    count += 1
    if guess > target:
        print("你猜的数字大于正确答案")
    elif guess < target:
        print("你猜的数字小于正确答案")
    else:
        print(f"你猜了{count}次，猜对了，真厉害")
        break